package com.example.studentstatusmanagement.service;

import com.example.studentstatusmanagement.mapper.ClassroomMapper;
import com.example.studentstatusmanagement.pojo.Classroom;
import com.example.studentstatusmanagement.pojo.ClassroomExample;
import com.example.studentstatusmanagement.pojo.doo.ReqClassroom;
import com.example.studentstatusmanagement.pojo.dto.ClassroomInfo;
import com.example.studentstatusmanagement.pojo.dto.SMajor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ClassroomServiceImpl implements ClassroomService{

    @Resource
    private ClassroomMapper classroomMapper;

    @Override
    public List<ClassroomInfo> selectClassroomsByMajorId(Integer id) {
        return classroomMapper.selectClassroomsByMajorId(id);
    }

    @Override
    public List<SMajor> selectClassroosInfo(ReqClassroom reqClassroom) {
        return classroomMapper.selectClassroosInfo(reqClassroom);
    }

    @Override
    public int updateByPrimaryKeySelective(Classroom record) {
        return classroomMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public Classroom selectByPrimaryKey(Integer id) {
        return classroomMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Classroom record) {
        return classroomMapper.insertSelective(record);
    }

    @Override
    public List<Classroom> selectByExample(ClassroomExample example) {
        return classroomMapper.selectByExample(example);
    }
}
